
import { lazy } from 'react'
const Home = lazy(() => import('../page/Home/index'))
const Layout = lazy(() => import('../page/Layout/index'))
const List = lazy(() => import('../page/List/index'))
const Zhgl = lazy(() => import('../page/List/zhgl/index'))
const Zhtcgl = lazy(() => import('../page/List/zhtcgl/index'))
const Order = lazy(() => import('../page/Oeder/index'))
const Cdgl = lazy(() => import('../page/cdgl/index'))
const Hcjk = lazy(() => import('../page/cdgl/hcjk/index'))
const Zxyh = lazy(() => import('../page/cdgl/zxyh/index'))
const User = lazy(() => import('../page/Oeder/user/index'))
const Type = lazy(() => import('../page/Oeder/type/index'))
import { createBrowserRouter } from 'react-router-dom'

const router = createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    children: [
      {
        path: '/',
        element: <Home />,
      },
      {
        path: '/list',
        element: <List />,
        children: [
          {
            path: '/list/zhgl',
            element: <Zhgl />,
          },
          {
            path: '/list/zhtcgl',
            element: <Zhtcgl />,
          }
        ]
      },
      {
        path: '/order',
        element: <Order />,
        children: [
          {
            path: '/order/user',
            element: <User />,
          },
          {
            path: '/order/type',
            element: <Type />,
          }
        ]
      }, {
        path: '/cdgl',
        element: <Cdgl />,
        children: [
          {
            path: '/cdgl/hcjk',
            element: <Hcjk />,
          },
          {
            path: '/cdgl/zxyh',
            element: <Zxyh />,
          }
        ]
      }
    ]
  }, {
    path: '*',
    element: <div>404</div>
  }
])
export default router